#include "Messages.h"
#include "..\CTurret.h"
#include "..\CBullet.h"

CCreateTurretMessage::CCreateTurretMessage() : CBaseMessage(MSG_CREATE_TURRET)
{

}

CCreateTurretMessage::~CCreateTurretMessage()
{
}

CCreateBulletMessage::CCreateBulletMessage(CTurret* _pTurret) : CBaseMessage(MSG_CREATE_BULLET)
{
	m_pTurret = _pTurret;

	if(m_pTurret)
		m_pTurret->AddRef();
}

CCreateBulletMessage::~CCreateBulletMessage()
{
	if(m_pTurret)
		m_pTurret->Release();
}

CDestroyTurretMessage::CDestroyTurretMessage(CTurret* _pTurret) : CBaseMessage(MSG_DESTROY_TURRET)
{
	m_pTurret = _pTurret;

	if(m_pTurret)
		m_pTurret->AddRef();
}

CDestroyTurretMessage::~CDestroyTurretMessage()
{
	if(m_pTurret)
		m_pTurret->Release();
}

CDestroyBulletMessage::CDestroyBulletMessage(CBullet* _pBullet) : CBaseMessage(MSG_DESTROY_BULLET)
{
	m_pBullet = _pBullet;

	if(m_pBullet)
		m_pBullet->AddRef();
}

CDestroyBulletMessage::~CDestroyBulletMessage()
{
	if(m_pBullet)
		m_pBullet->Release();
}